﻿using _01_Tower4._0.CharacterBase;
using _01_Tower4._0.GameFrame.System;
using _01_Tower4._0.Items.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _01_Tower4._0.Items
{
    internal class Key1_0 : KeyBase
    {
        public Key1_0() : base(301, "钥匙1.0", "可以打开一层的门。", "你尝试对空气开门。。。")
        {
        }

        public override bool Use()
        {
            base.Use();
            if (!Hero.canUseKey)
            {
                InfoSystem.Instance.AddInfo($"使用了{Name}", ConsoleColor.Yellow);
                InfoSystem.Instance.AddInfo(FeedBack);
                return Hero.canUseKey;
            }
            else
            {
                FeedBack = "门打开了";
                InfoSystem.Instance.AddInfo($"使用了{Name}", ConsoleColor.Yellow);
                Hero.doorIsOpen1 = true;
                InfoSystem.Instance.AddInfo(FeedBack);
                return Hero.canUseKey;
            }
        }
    }
}
